from django.contrib import admin

from zanhu02.qa.models import Question,Answer,Vote


class QuestionAdmin(admin.ModelAdmin):
    list_display = ['title','status','has_answer','votes']
    fields = ['user','title','slug','status','tags','has_answer','votes']


class AnswerAdmin(admin.ModelAdmin):
    list_display = ['question','is_answer']
    fields = ['user','question','content','is_answer','votes']


class VoteAdmin(admin.ModelAdmin):
    list_display = ['user','value','object_id','vote']
    fields = ['user','value','object_id','vote']


admin.site.register(Question,QuestionAdmin)
admin.site.register(Answer,AnswerAdmin)
admin.site.register(Vote,VoteAdmin)


